//
//  NormalCollectionViewDataSource.h
//  MirrorCharge
//
//  Created by dllo on 16/10/19.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
@class BaseCollectionViewCell;

typedef NS_ENUM(NSInteger,NormalCollectionViewType) {
    NormalCollectionViewTypeModel = 1,
    NormalCollectionViewTypeArray = 2
};

typedef BaseCollectionViewCell *(^ConfigCell)(__kindof UICollectionView *collectionView, NSIndexPath *indexPath);
typedef UICollectionReusableView *(^ConfigHeaderOrFooterView)(__kindof UICollectionView *collectionView, NSString *kind, NSIndexPath *indexPath);

@interface NormalCollectionViewDataSource : NSObject<UICollectionViewDataSource>


@property (nonatomic, copy) ConfigCell configCell;

@property (nonatomic, strong) NSArray *sourceArray;
@property (nonatomic, assign) NormalCollectionViewType type;
@property (nonatomic, strong) NSArray<NSIndexPath *> *reviseIndexPaths;
@property (nonatomic, strong) NSArray<NSString *> *reviseReuses;
@property (nonatomic, copy) ConfigHeaderOrFooterView configHeaderOrFooterView;

+ (__kindof NormalCollectionViewDataSource *)NormalCollectionViewDataSource;

+ (__kindof NormalCollectionViewDataSource *)NormalCollectionViewDataSourceWithNormalType:(NormalCollectionViewType)type;

+ (__kindof NormalCollectionViewDataSource *)NormalCollectionViewDataSourceWithNormalType:(NormalCollectionViewType)type configCellBlock:(ConfigCell)configCell;

+ (__kindof NormalCollectionViewDataSource *)NormalCollectionViewDataSourceWithNormalType:(NormalCollectionViewType)type configHeaderOrFooterView:(ConfigHeaderOrFooterView)configHeaderOrFooterView;

+ (__kindof NormalCollectionViewDataSource *)NormalCollectionViewDataSource:(NSArray *)sourceArray sourceArrayType:(NormalCollectionViewType)type configCellBlock:(ConfigCell)configCell;

+ (__kindof NormalCollectionViewDataSource *)NormalCollectionViewDataSource:(NSArray *)sourceArray sourceArrayType:(NormalCollectionViewType)type reviseIndexPath:(NSArray<NSIndexPath *> *)reviseIndexPaths reviseReuses:(NSArray<NSString *> *)reviseReuses configCellBlock:(ConfigCell)configCell;

+ (__kindof NormalCollectionViewDataSource *)NormalCollectionViewDataSource:(NSArray *)sourceArray sourceArrayType:(NormalCollectionViewType)type reviseIndexPath:(NSArray<NSIndexPath *> *)reviseIndexPaths reviseReuses:(NSArray<NSString *> *)reviseReuses configCellBlock:(ConfigCell)configCell configHeaderOrFooterView:(ConfigHeaderOrFooterView)configHeaderOrFooterView;

@end
